﻿using EMRView.Extensions.Extension;
using EMRView.Extensions.HCAttribute;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace EMRView.Extensions.Command.StandardCommand.Insert
{
    [Command(CommandType.插入, "AddGroup", "添加可编辑的域，可用于段落等复杂的输入情况")]
    public class AddGroupCommand : BaseCommand
    {
        public override Icon CommandIcon => EMRView.Extensions.Properties.HCResource.输入域;

        public override object Execute(HCEmrView _view, bool showDefaultUI = true, params object[] para)
        {
            Frm_AddEdit input = new Frm_AddEdit();

            if (input.ShowDialog() == DialogResult.OK)
            {
                _view.AddDomain();
            }
            return null;
        }

        public override void InitControl(object control)
        {

        }
    }
}
